package com.limingfeiyu.common.code;

/**
 * @Author: 黎铭飞羽
 * @Data: 2024-03-01 :   8:29
 * @Description: 状态码
 */
public enum StatusCode {
    /**
     * 成功
     */
    OK(200, "success"),
    FAIL(1000, "fail"),
    ALERT(1001, "alert"),

    /**
     * 系统错误
     */
    ERROR(5000, "error"),
    GATEWAY_TIMEOUT(5004, "gateway_timeout"),
    SERVICE_UNAVAILABLE(5003, "service_unavailable");
    private int code;
    private String message;

    StatusCode() {
    }

    private StatusCode(int code, String message) {
        this.code = code;
        this.message = message;
    }


    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
